<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>水果订单</title>
    <link rel="stylesheet" href="css/userinfo/navbar1.css">
    <link rel="stylesheet" href="./css/order/titlestyle.css">
    <link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery.min.js"></script>
    <script src="/bootstrap/js/bootstrap.min.js"></script>
    <script>
        function home_page() {
            window.location.href = "first_page.html";
        }

        function user_info() {
            window.location.href = "userinfo.html";
        }

        function fruit_show() {
            window.location.href = "showfruits.html";
        }
    </script>
</head>

<body class="order-body">
<!--<body id="list-bought-items" class="order-body"-->
<!--style="background-image: url('./img/order/background.jpg'); background-size: cover">-->

<div class="container1">
    <!--导航栏-->
    <div class="header1">
        <div class="left">
            <a href="#" style="font-size: xx-large">
                <span>Fruit</span>
                <img class="img1" src="img/login-img/logo-icon.png"  alt="img1">
                <span class="light-font">福禄德水果</span>
            </a>
            <span>水果商店</span>
        </div>
        <div class="right">
            <a href="#" onclick="home_page()">主页</a>
            <a href="#">关于我们</a>
            <a href="#">商店</a>
            <a href="#">店铺单</a>
            <a href="#" onclick="user_info()">个人信息</a>
            <a href="#">联系我们</a>
        </div>
    </div>
</div>

<div>
    <section class="header-bg">
        <!--头图-->
    </section>

    <div class="order-header">

        <div class="order-first-header">
            <div class="order-title">
                <!--<span id="first">-->
                    <!--<a href="#" onclick="user_info()">我的</a>-->
                <!--</span>-->
                <!--<span class="after">-->
                    <!--<a href="#" onclick="fruit_show()">首页</a>-->
                <!--</span>-->
                <!--<div class="order_order">-->
                    <span id="first">
                        <a href="javascript:" class="current all " name="all">已完成订单</a>
                    </span>
                    <span class="after">
                        <a href="javascript:" class="unpaid " name="unpaid">待支付</a>
                        <span>(</span><span class="count2"></span><span>)</span>
                    </span>
                    <span class="after">
                        <a href="javascript:" class="undeliver " name="undeliver">待发货</a>
                        <span>(</span><span class="count3"></span><span>)</span>
                     </span>
                    <span class="last">
                        <a href="javascript:" class="unreceive " name="unreceive">待收货</a>
                        <span>(</span><span class="count4"></span><span>)</span>
                    </span>
                <!--</div>-->
            </div>
        </div>

        <!--订单内容-->
        <div class="order-fruit">
            <!--订单头信息-->
            <div class="order-fruit-title">
                <span class="col-lg-3 left-p0" style="float: left;">商品信息</span>
                <span class="col-lg-2 left-p0">单价</span>
                <span class="col-lg-2 left-p0">数量</span>
                <span class="col-lg-2 left-p0">金额</span>
                <span class="col-lg-3 left-p0">操作</span>
            </div>

            <div style="height: 800px">
                <!-- order detail 全部订单 -->
                <ul class="list-ul" style="display: block;" id="all">
                    <li class="all_order">
                        <ul class="cart-inner">
                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3">-->
                                        <!--<img src="./img/order/strawberry.png" alt=""/>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜草莓</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥8.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>3</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">19.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/cherry.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜车厘子</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">8.00</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥12.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>2</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">24.00</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/pineapple.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜凤梨</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">8.00</span></div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>1</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">16.00</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/lemon.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜柠檬</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span></div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>4</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">6.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3">-->
                                        <!--<img src="./img/order/strawberry.png" alt=""/>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>本地特产大棚新鲜草莓，粪水灌溉</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥8.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>3</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">19.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->
                        </ul>
                    </li>
                </ul>
                <!--待支付-->
                <ul class="list-ul" style="display: none;" id="unpaid">
                    <li class="unpaid_order">
                        <ul class="cart-inner">

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/cherry.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜车厘子</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">8.00</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥12.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>2</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">24.00</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/pay.jpg"><span>&nbsp;去支付&nbsp;&nbsp;</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/lemon.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜柠檬</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span></div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>4</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">6.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/pay.jpg"><span>&nbsp;去支付&nbsp;&nbsp;</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3">-->
                                        <!--<img src="./img/order/strawberry.png" alt=""/>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>本地特产大棚新鲜草莓，粪水灌溉</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥8.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>3</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">19.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/pay.jpg"><span>&nbsp;去支付&nbsp;&nbsp;</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->
                        </ul>
                    </li>
                </ul>
                <!--待发货-->
                <ul class="list-ul" style="display: none;" id="undeliver">
                    <li class="undeliver_order">
                        <ul class="cart-inner">
                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/lemon.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜柠檬</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span></div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>4</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">6.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看订单详情&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3">-->
                                        <!--<img src="./img/order/strawberry.png" alt=""/>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>本地特产大棚新鲜草莓，粪水灌溉</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥8.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>3</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">19.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看订单详情&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->
                        </ul>
                    </li>
                </ul>
                <!--待收货-->
                <ul class="list-ul" style="display: none;" id="unreceive">
                    <li class="unreceive_order">
                        <ul class="cart-inner" >
                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/cherry.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜车厘子</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">8.00</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥12.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>2</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">24.00</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看物流详情&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/pineapple.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜凤梨</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">8.00</span></div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>1</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">16.00</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看物流详情&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/lemon.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜柠檬</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span></div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>4</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">6.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看物流详情&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3">-->
                                        <!--<img src="./img/order/strawberry.png" alt=""/>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜草莓</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">6.50</span>-->
                                        <!--<del style="font-size: smaller;padding-left: 10px">￥8.00</del>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>3</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">19.50</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看订单详情&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->

                            <!--<li>-->
                                <!--<div class="cart-div1" style="border-bottom: 1px dashed #ddd;">-->
                                    <!--<div class="cart-div3"><img src="./img/order/pineapple.png" alt=""/></div>-->
                                    <!--<div class="cart-div4">-->
                                        <!--<span>新鲜凤梨</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div5 ">￥<span class="unit-price">8.00</span></div>-->
                                    <!--<div class="cart-div6">-->
                                        <!--<span>1</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">16.00</span>-->
                                    <!--</div>-->
                                    <!--<div class="cart-div8">-->
                                        <!--&lt;!&ndash;操作&ndash;&gt;-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看订单详情&nbsp;&nbsp;</span></a>-->
                                        <!--<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</li>-->
                        </ul>
                    </li>
                </ul>
            </div>
        </div>

        <!--分页栏-->
        <div class="order-page">
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <!--<li>-->
                        <!--<a href="#" aria-label="Previous">-->
                            <!--<span aria-hidden="true">&laquo;</span>-->
                        <!--</a>-->
                    <!--</li>-->
                    <!--<li><a href="#">1</a></li>-->
                    <!--<li><a href="#">2</a></li>-->
                    <!--<li><a href="#">3</a></li>-->
                    <!--<li><a href="#">4</a></li>-->
                    <!--<li><a href="#">5</a></li>-->
                    <!--<li>-->
                        <!--<a href="#" aria-label="Next">-->
                            <!--<span aria-hidden="true">&raquo;</span>-->
                        <!--</a>-->
                    <!--</li>-->
                </ul>
            </nav>
        </div>

        <!--底部内容-->
        <div style="width: 100%; height: 200px; background-color: #8c8c8c">

        </div>

    </div>

</div>

<!--添加评论-->
<div class="order_comment" style="display: none">
    <textarea rows="3" cols="80" placeholder="请输入小主的评论" style="float: left"></textarea>
    <!--<input class="btn btn-default" type="submit" value="评论提交" style="float: left">-->
    <button id="order_comment_modal" type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" style="float: left">提交评论</button>
</div>

<!--订单状态总数-->
<script>
    // $(function () {
    //     var html = '<span id="first"><a href="javascript:" class="current all" name="all">已完成订单</a></span>';
    //     $('div.order-title').append(html);
    // })
    //
    // $(function () {
    //     var html = '<span class="after"><a href="javascript:" class="unpaid" name="unpaid">待支付</a>';
    //     html += '<span class="count2" onchange="count2()">()</span></span>';
    //     $('div.order-title').append(html);
    // })
    //
    // $(function () {
    //     var html = '<span class="after"><a href="javascript:" class="undeliver" name="undeliver">待发货</a>';
    //     html += '<span class="count3">()</span></span>';
    //     $('div.order-title').append(html);
    // })
    //
    // $(function () {
    //     var html = '<span class="last"><a href="javascript:" class="unreceive" name="unreceive">待收货</a>';
    //     html += '<span class="count4">()</span></span>';
    //     $('div.order-title').append(html);
    // })

    // 状态2的订单数量显示
    $(document).ready(function () {
        $.ajax({
            url:"/ordershow/count2",
            type:"post",
            success:function (data) {
                console.log(data)
                $('.count2').html(data)
            }
        })
    })

    // 状态3的订单数量显示
    $(document).ready(function () {
        $.ajax({
            url:"/ordershow/count3",
            type:"post",
            success:function (data) {
                $('.count3').html(data)
            }
        })
    })
    // 状态4的订单数量显示
    $(document).ready(function () {
        $.ajax({
            url:"/ordershow/count4",
            type:"post",
            success:function (data) {
                $('.count4').html(data)
            }
        })
    })

    // count2()
    // count3()
    // count4()
</script>

<!--数据库数据显示-->
<script>
    $(function () {
        // 数据库所有订单数据展示
        $('.all').on('click',function () {
            $.ajax({
                url:"/ordershow/showall",
                type:"post",
                dataType:"json",
                success:function (data) {
                    console.log(data)
                    for (var i = 0; i < data.length; i++) {
                        var html = '<li><div class="cart-div1 div0 divtemp" style="border-bottom: 1px dashed #ddd;">';
                        html += '<div class="status" style="display: none" name="orderStatus">'+data[i].orderStatus+'</div>';
                        html += '<div class="cart-div3"><img src="'+data[i].picUrl+'" alt=""/></div>';
                        html += '<div class="cart-div4"><span>'+data[i].fruitName+'</span></div>';
                        html += '<div class="cart-div5 ">￥<span class="unit-price">'+data[i].fruitPrice+'</span></div>';
                        html += '<div class="cart-div6"><span>'+data[i].weight+'</span></div>';
                        html += '<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">'+data[i].orderMoney+'</span></div>';
                        html += '<div class="cart-div8 oder0 order00">';
                        html += '<a class="order-operate" href="http://localhost:8888/comment.html?resourceId='+data[i].fruitId+'"><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>';
                        html += '<a class="order-operate" href="http://localhost:8888/fruitdetail/fruit/'+data[i].fruitId+'"><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>';
                        html += '</div></div></li>';
                        $('ul.cart-inner').append(html);
                    }
                }
            })
        })
    })

    $(function () {
        // 数据库待支付数据展示
        $('.unpaid').on('click',function () {
            $.ajax({
                url:"/ordershow/showunpaid",
                type:"post",
                dataType:"json",
                success:function (data) {
                    console.log(data)
                    for (var i = 0; i < data.length; i++) {
                        var html = '<li><div class="cart-div1 div1 divtemp" style="border-bottom: 1px dashed #ddd;">';
                        html += '<div class="status" style="display: none" name="orderStatus">'+data[i].orderStatus+'</div>';
                        html += '<div class="cart-div3"><img src="'+data[i].picUrl+'" alt=""/></div>';
                        html += '<div class="cart-div4"><span>'+data[i].fruitName+'</span></div>';
                        html += '<div class="cart-div5 ">￥<span class="unit-price">'+data[i].fruitPrice+'</span></div>';
                        html += '<div class="cart-div6"><span>'+data[i].weight+'</span></div>';
                        html += '<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">'+data[i].orderMoney+'</span></div>';
                        html += '<div class="cart-div8 order1 order00">';
                        html += '<a class="order-operate" href="./pay.html"><img src="./img/order/pay.jpg"><span>&nbsp;去支付&nbsp;&nbsp;</span></a>';
                        html += '<a class="order-operate console" href=""><img src="./img/order/refund.jpg"><span>&nbsp;取消订单&nbsp;&nbsp;</span></a>';
                        html += '</div></div></li>';
                        $('ul.cart-inner').append(html);

                        var orderId = data[i].orderId
                        var orderStatus = $('.status').eq(i).html()
                        console.log("order_id:"+ orderId)
                        console.log("fruit_status:"+ orderStatus)

                        $(function () {
                            $('.console').on('click',function () {
                                $('.status').html('0')
                                var orderStatus =  $('.status').html();
                                $.ajax({
                                    url:"/ordershow/updateorderstatus",
                                    data:"orderId=" + orderId + "&orderStatus=" + orderStatus,
                                    type:"post",
                                    success:function (data) {
                                        if(data == 1){
                                            alert("取消订单成功！")
                                        }else {
                                            alert("取消失败，请重新操作")
                                        }
                                    }
                                })
                            })
                        })
                    }
                }
            })
        })
    })

    $(function () {
        // 数据库待发货数据展示
        $('.undeliver').on('click',function () {
            $.ajax({
                url:"/ordershow/showundeliver",
                type:"post",
                dataType:"json",
                success:function (data) {
                    console.log(data)
                    for (var i = 0; i < data.length; i++) {
                        var html = '<li><div class="cart-div1 div2 divtemp" style="border-bottom: 1px dashed #ddd;">';
                        html += '<div class="status" style="display: none" name="orderStatus">'+data[i].orderStatus+'</div>';
                        html += '<div class="cart-div3"><img src="'+data[i].picUrl+'" alt=""/></div>';
                        html += '<div class="cart-div4"><span>'+data[i].fruitName+'</span></div>';
                        html += '<div class="cart-div5 ">￥<span class="unit-price">'+data[i].fruitPrice+'</span></div>';
                        html += '<div class="cart-div6"><span>'+data[i].weight+'</span></div>';
                        html += '<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">'+data[i].orderMoney+'</span></div>';
                        html += '<div class="cart-div8 order2 order00">';
                        html += '<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看订单详情&nbsp;&nbsp;</span></a>';
                        html += '<a class="order-operate refund" href="./refund.html"><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>';
                        html += '</div></div></li>';
                        $('ul.cart-inner').append(html);

                        var orderId = data[i].orderId
                        var orderStatus = $('.status').eq(i).html()
                        console.log("order_id:"+ orderId)
                        console.log("fruit_status:"+ orderStatus)

                        $(function () {
                            $('.refund').on('click',function () {
                                $('.status').html('1')
                                var orderStatus =  $('.status').html();
                                $.ajax({
                                    url:"/ordershow/updateorderstatus",
                                    // contentType:"application/json",
                                    // data:JSON.stringify(orderStatus),
                                    data:"orderId=" + orderId + "&orderStatus=" + orderStatus,
                                    type:"post",
                                    success:function (data) {
                                        if(data == 1){
                                            alert("退款成功")
                                        }else {
                                            alert("退款失败，请重新操作")
                                        }
                                    }
                                })
                            })
                        })
                    }
                }
            })
        })
    })


    $(function () {
        // 数据库待收货数据展示
        $('.unreceive').on('click',function () {
            $.ajax({
                url:"/ordershow/showunreceive",
                type:"post",
                dataType:"json",
                success:function (data) {
                    console.log(data)
                    for (var i = 0; i < data.length; i++) {
                        var html = '<li><div class="cart-div1 div3 divtemp" style="border-bottom: 1px dashed #ddd;">';
                        html += '<div class="status" style="display: none" name="orderStatus">'+data[i].orderStatus+'</div>';
                        html += '<div class="cart-div3"><img src="'+data[i].picUrl+'" alt=""/></div>';
                        html += '<div class="cart-div4"><span>'+data[i].fruitName+'</span></div>';
                        html += '<div class="cart-div5 ">￥<span class="unit-price">'+data[i].fruitPrice+'</span></div>';
                        html += '<div class="cart-div6"><span>'+data[i].weight+'</span></div>';
                        html += '<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">'+data[i].orderMoney+'</span></div>';
                        html += '<div class="cart-div8 order3 order00">';
                        html += '<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看物流详情&nbsp;&nbsp;</span></a>';
                        html += '<a class="order-operate confirm" href=""><img src="./img/order/confirm.jpg"><span>&nbsp;确认收货</span></a>';
                        html += '</div></div></li>';
                        $('ul.cart-inner').append(html);

                        var orderId = data[i].orderId
                        var orderStatus = $('.status').eq(i).html()
                        console.log("order_id:"+ orderId)
                        console.log("fruit_status:"+ orderStatus)

                        $(function () {
                            $('.confirm').on('click',function () {
                                $('.status').html('1')
                                var orderStatus =  $('.status').html();
                                $.ajax({
                                    url:"/ordershow/updateorderstatus",
                                    data:"orderId=" + orderId + "&orderStatus=" + orderStatus,
                                    type:"post",
                                    success:function (data) {
                                        if(data == 1){
                                            alert("确认收货成功！")
                                        }else {
                                            alert("确认失败，请重新确认")
                                        }
                                    }
                                })
                            })
                        })
                    }
                }
            })
        })
    })

    // $.ajax({
    //     url:"/ordershow/showall",
    //     type:"post",
    //     dataType:"json",
    //     success:function (data) {
    //         console.log(data)
    //         for (var i = 0; i < data.length; i++) {
    //             var html = '<li><div class="cart-div1" style="border-bottom: 1px dashed #ddd;">';
    //             html += '<div class="cart-div3"><img src="'+data[i].picUrl+'" alt=""/></div>';
    //             html += '<div class="cart-div4"><span>'+data[i].fruitDescript+'</span></div>';
    //             html += '<div class="cart-div5 ">￥<span class="unit-price">'+data[i].fruitPrice+'</span></div>';
    //             html += '<div class="cart-div6"><span>'+data[i].weight+'</span></div>';
    //             html += '<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">'+data[i].orderMoney+'</span></div>';
    //             html += '<div class="cart-div8 order0 order00">';
    //             html += '<a class="order-operate" href=""><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>';
    //             html += '<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>';
    //             html += '</div></div></li>';
    //             $('ul.cart-inner').append(html);
    //         }
    //     }
    // })

</script>

<!--支付功能-->
<script>
    function pay() {
        $.get("/pay/topay");
    }
</script>


<!--各订单状态间的切换-->
<script>
    $('.order-title a').click(function () {
        // $('ul.list-ul').css("display","none");
        // $('ul.list-ul').removeClass("current");
        // var id = $(this).attr("name");
        // console.log(id)
        // $('#'+id).css("display","block");
        // $('#'+id).addClass("current");

        // $('ul.list-ul').addClass("display-none");
        var ids = ["all","unpaid","undeliver","unreceive"];
        var id = $(this).attr("name");
        var num = ["0","1","2","3"]
        console.log(id);
        for ( var i=0; i<ids.length; i++){
            if ( ids[i] == id ){
                // $('#'+id).show();
                // console.log(ids[i]+"test1")
                $('.div'+ids[i]).replaceAll($('.divtemp'))
                // $('.order_click'+ids[i]).css('text_decoration','underline')
            }else{
                // console.log(ids[i]+"test2")
                // $('#'+ids[i]).hide();
            }
        }
    })
</script>


<!--注释掉的无用(功能等于切换订单状态)-->
<script>
    // 全部订单、待支付、待发货、待收货界面切换
    // window.onload = function () {
    //       //获取需要的标签
    //     var as = document.getElementsByClassName('order-title')[0].getElementsByTagName('a');
    //     var contents = document.getElementsByClassName('list-ul');
    //       遍历
    //     for (var i = 0; i < as.length; i++) {
    //         //  取出单个对象
    //         var a = as[i];
    //         a.id = i;
    //
    //         //  监听鼠标的移动事件
    //         a.onclick = function () {
    //             // 让所有的a的class都清除
    //             for (var j = 0; j < as.length; j++) {
    //                 as[j].className = '';
    //                 contents[j].style.display = 'none';
    //             }
    //             // 设置当前a的class
    //             this.className = 'current';
    //             // 从contents数组中取出对应的标签
    //             contents[this.id].style.display = 'block';

                // 数据库所有订单数据展示
                // $.ajax({
                //     url:"/ordershow/showall",
                //     type:"post",
                //     dataType:"json",
                //     success:function (data) {
                //         console.log(data);
                //         for (var k = 0; k < data.length; k++) {
                //             var html = '<li><div class="cart-div1" style="border-bottom: 1px dashed #ddd;">';
                //             html += '<div class="cart-div3"><img src="'+data[k].picUrl+'" alt=""/></div>';
                //             html += '<div class="cart-div4"><span>'+data[k].fruitDescript+'</span></div>';
                //             html += '<div class="cart-div5 ">￥<span class="unit-price">'+data[k].fruitPrice+'</span></div>';
                //             html += '<div class="cart-div6"><span>'+data[k].weight+'</span></div>';
                //             html += '<div class="cart-div7" style="padding-left: 160px">￥<span class="subtotal-price">'+data[k].orderMoney+'</span></div>';
                //             html += '<div class="cart-div8">';
                //             if(j == 0){
                //                 html += '<a class="order-operate" href=""><img src="./img/order/plus.jpg"><span>&nbsp;添加评论&nbsp;&nbsp;</span></a>';
                //                 html += '<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看详情</span></a>';
                //             }else if(j == 1){
                //                 html += '<a class="order-operate" href=""><img src="./img/order/pay.jpg"><span>&nbsp;去支付&nbsp;&nbsp;</span></a>';
                //             }else if(j == 2){
                //                 html += '<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看订单详情&nbsp;&nbsp;</span></a>';
                //                 html += '<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>';
                //             }else {
                //                 html += '<a class="order-operate" href=""><img src="./img/order/amplify.jpg"><span>&nbsp;查看订单详情&nbsp;&nbsp;</span></a>';
                //                 html += '<a class="order-operate" href=""><img src="./img/order/refund.jpg"><span>&nbsp;去退款</span></a>';
                //             }
                //             html += '</div></div></li>';
                //             $('ul.cart-inner').append(html);
                //         }
                //     }
                // })
    //         }
    //     }
    // }
</script>


<!--分页显示-->
<script>
    function requestData(pageNum) {

        $.ajax({
            url: "/ordershow/page",
            data:{
                pageSize:6,
                pageNum:pageNum,
            },
            dataType:"json",
            type:"post",
            success: function (data) {

                showPages(data.totalSize, data.pageSize, data.pageNum)
            }
        })
    }

    function showPages(totalSize,pageSize,pageNum){
        var totalPage
        // console.log(totalPage)
        console.log(totalSize)
        console.log(pageSize)
        console.log(pageNum)
        if(totalSize % pageSize == 0){
            totalPage = Math.floor(totalSize/pageSize)
        } else {
            totalPage = Math.floor(totalSize/pageSize + 1)
        }
        console.log(totalPage)

        var html =  '<li><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>';
        for(var i = 1; i <= totalPage; i++){
            html +=  '<li ';
            if(pageNum == i) {
                html += 'class="active"'
            }
            html += '><span onclick="requestData('+ i +')">'+ i + '</span></li>';
        }
        html += '<li><a href="#" aria-label="Next"><span aria-hidden="true" onclick=requestData(';
        if(pageNum == totalPage){
            html += pageNum
        } else {
            html += (pageNum + 1)
        }
        html += ')>&raquo;</span></a></li>';
        $(".pagination").append(html)
    }

    requestData(1);

</script>


</body>

</html>